package cn.mavor.day0927;

import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

public class DaysSinceDoomsday {
    public static void main(String[] args) {
        // 定义“世界末日”日期
        LocalDate doomsday = LocalDate.of(2012, 12, 21);

        // 获取当前日期
        LocalDate now = LocalDate.now();

        // 计算两个日期之间的天数差
        long daysBetween = ChronoUnit.DAYS.between(doomsday, now);

        // 输出结果
        System.out.println("自2012-12-21以来已经过去了 " + daysBetween + " 天。");
    }
}